package com.itheima.常用API.object;
/*重写Object的toString方法(默认打印地址值),对象上转型*/
public class Obj {
    public static void main(String[] args) {
        Student stu=new Student();
        System.out.println(stu);
        System.out.println(stu.toString());
    }
}
class Student{
    String name="hello world........";

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                '}';
    }
}